// 引入 request 方法，假设 request 方法已经定义在某个工具文件中
import request from '/@/utils/request';
import { SmsVerifyCodeInput } from '../models';
// 定义 API 路径枚举
enum Api {
    SysSmsAliyunSendSms = '/sysSms/aliyunSendSms/{phoneNumber}',
    SysSmsAliyunSendSmsTemplate = '/sysSms/aliyunSendSmsTemplate/{phoneNumber}',
    SysSmsSendSms = '/sysSms/sendSms/{phoneNumber}',
    SysSmsTencentSendSms = '/sysSms/tencentSendSms/{phoneNumber}',
    SysSmsVerifyCode = '/sysSms/verifyCode',
}

// 定义 API 方法
export const apiSysSmsAliyunSendSmsPhoneNumberPost = (phoneNumber: string) =>
    request({
        url: Api.SysSmsAliyunSendSms.replace('{phoneNumber}', phoneNumber),
        method: 'post',
    });

export const apiSysSmsAliyunSendSmsTemplatePhoneNumberPost = (phoneNumber: string, body: any) =>
    request({
        url: Api.SysSmsAliyunSendSmsTemplate.replace('{phoneNumber}', phoneNumber),
        method: 'post',
        data: body,
    });

export const apiSysSmsSendSmsPhoneNumberPost = (phoneNumber: string) =>
    request({
        url: Api.SysSmsSendSms.replace('{phoneNumber}', phoneNumber),
        method: 'post',
    });

export const apiSysSmsTencentSendSmsPhoneNumberPost = (phoneNumber: string) =>
    request({
        url: Api.SysSmsTencentSendSms.replace('{phoneNumber}', phoneNumber),
        method: 'post',
    });

export const apiSysSmsVerifyCodePost = (body?: SmsVerifyCodeInput) =>
    request({
        url: Api.SysSmsVerifyCode,
        method: 'post',
        data: body,
    });